<!DOCTYPE html>
<html lang="zh">
<head>
    <meta charset="UTF-8">
    <title>测试js日期格式化</title>
    <script src="../zujian/han/han.js"></script>
</head>
<body>
<script type="text/javascript">
    hwrite(dateFormat(new Date()))
    var xx="2024/09/30"
    //replace是去掉第一个
    alert(String(xx).replaceAll("/","").substring(0,8))
</script>
</body>
</html>